package cn.edu.zju.gis.disasterBE.sever.controller;

import cn.edu.zju.gis.disasterBE.sever.entity.TwitterWord;
import cn.edu.zju.gis.disasterBE.sever.entity.global.MyResponse;
import cn.edu.zju.gis.disasterBE.sever.service.TwitterWordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("社交媒体模块")
@RestController
@RequestMapping("/media")
@RequiredArgsConstructor(onConstructor_ = {@Autowired})
public class TwitterWordController {
    private final TwitterWordService twitterWordService;

    @ApiOperation("获得数据库中推特趋势")
    @GetMapping("/twitterWordGet")
    public MyResponse<List<TwitterWord>> twitterWordGet()
    {
        return twitterWordService.twitterWordGet();
    }

}
